#include <stdio.h>

#define LEAP_YEAR(x) do{\
if((x%4==0 && x%100!=0) || (x%400==0))\
	printf("L");\
else\
	printf("N");\
}while(0);

int main()
{
	int year;
	scanf("%d",&year);
	LEAP_YEAR(year);
	return 0;
}